//
//  RSSpecialField.h
//  RSTools
//
//  Created by thinkjoy on 2017/10/10.
//  Copyright © 2017年 杜瑞胜. All rights reserved.
//  模仿https://github.com/Jvaeyhcd/HcdSpecialField 的swift编写

#import <UIKit/UIKit.h>

@interface RSSpecialField : UIControl

- (instancetype)initWithFrame:(CGRect)frame;
- (instancetype)init;


/**
 编码长度,默认为4
 */
@property   (nonatomic,assign)  IBInspectable   NSInteger   numberOfDigits;

/**
 已填写内容
 */
@property   (nonatomic,copy)    IBInspectable   NSString    * inputNumberStr;

/**
 密码样式，默认为NO，直接显示填写的数字；否则以*代替
 */
@property   (nonatomic,assign)  IBInspectable   BOOL    secureTextEntry;

/**
 未输入内容的是否填充"—"字符，默认填充
 */
@property   (nonatomic,assign,getter=isEnableEmptyDash)  IBInspectable   BOOL    enableEmptyDash;

/**
 间距，默认为10.f
 */
@property   (nonatomic,assign)  IBInspectable   CGFloat spaceBetweenDigits;

/**
 已输入内容颜色
 */
@property   (nonatomic,strong)  IBInspectable   UIColor * textColor;

/**
 已输入内容背景颜色
 */
@property   (nonatomic,strong)  IBInspectable   UIColor * textBackColor;

/**
 未输入内容时填充字符(如"—")的颜色
 */
@property   (nonatomic,strong)  IBInspectable   UIColor * dashColor;

/**
 未输入内容时的背景颜色
 */
@property   (nonatomic,strong)  IBInspectable   UIColor * dashBackColor;

@property   (nonatomic,copy)    void(^inputNumberHadChange)(NSString * inputNumberStr);

@end
